import type { App } from 'vue'
import { createI18n } from 'vue-i18n';
import en from '@/locales/en';
import zh from '@/locales/zh';

export function setupVueI18n(app: App) {
    const i18n = createI18n({
        legacy: false, 
        globalInjection: true, 
        locale: uni.getLocale(),
        messages: {
          en,
          zh,
        },
    });
    app.use(i18n)
}

export default setupVueI18n